package com.cloud.rou.im.connection.container.listen;

import com.cloud.rou.im.connection.container.event.SessionEvent;
import com.cloud.rou.im.connection.container.session.Session;
import lombok.extern.slf4j.Slf4j;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 */
@Slf4j
public class LogSessionListener implements SessionListener {
    @Override
    public void sessionCreated(SessionEvent event) {
        Session session = event.getSession();
       log.info("the session is Created [userId:{}]",session.getUserId());

    }

    @Override
    public void sessionDestroyed(SessionEvent event) {
        Session session = event.getSession();
        log.info("the session is Destroyed [userId:{}]",session.getUserId());
    }
}
